package com.iss.lxhproject.dao;

import com.iss.lxhproject.entity.Room;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface RoomfulDao {
    @Insert("insert into roomful values(#{room_id},#{room_type},#{room_price},#{room_state})")
    public Integer insertRoom(String room_id, String room_type, String room_price, String room_state);
    @Delete("delete from table roomful where room_id=#{room_id}")
    public Integer deletRoom(String room_id);
    @Update("update roomful set room_id=#{room_id},room_type=#{room_type},room_price=#{room_price},room_state=#{room_state}")
    public Integer updateRoom(String room_id);
    @Select("select room_id,room_type,room_price,room_state from roomful where room_id=#{room_id}")
    public Room selectRoom(String room_id);
    @Select("select * from roomful")
    List<Room> selectAllRoom();
}
